package online.flowerinsnow.tcpudpclient.gui

import online.flowerinsnow.tcpudpclient.gui.tcp.TCPTab
import javax.swing.JFrame
import javax.swing.JTabbedPane

class MainGUI : JFrame("TCP UDP 客户端") {
    private val container = contentPane

    val tab = JTabbedPane(JTabbedPane.TOP)
    val tcp = TCPTab()
    init {
        initFrame()
        initComps()
        addListener()
        isVisible = true
    }

    private fun initFrame() {
        setSize(500, 400)
        setLocationRelativeTo(null)
        defaultCloseOperation = EXIT_ON_CLOSE
    }

    private fun initComps() {
        tab.addTab("TCP", tcp)
        container.add(tab)
    }

    private fun addListener() {

    }
}